#!/bin/sh
LIB_DIR=/root/lib_r/tassl/lib
INC_DIR=/root/lib_r/tassl/include
PROGRAMES="benchsm2 benchsm3 benchsm4"

if [ $1"X" = "cleanX" ] ; then
printf "cleaning the programe %s.....\n" $PROGRAMES
	rm -rf ${PROGRAMES} 
else
printf "compiling the programe.....\n"
gcc -ggdb3 -O0 -o benchsm2 benchsm2.c -I${INC_DIR}  ${LIB_DIR}/libssl.a ${LIB_DIR}/libcrypto.a  -ldl -lpthread
gcc -ggdb3 -O0 -o benchsm3 benchsm3.c -I${INC_DIR}  ${LIB_DIR}/libssl.a ${LIB_DIR}/libcrypto.a  -ldl -lpthread
gcc -ggdb3 -O0 -o benchsm4 benchsm4.c  -I${INC_DIR}  ${LIB_DIR}/libssl.a ${LIB_DIR}/libcrypto.a  -ldl -lpthread
fi
